﻿@using MC.RideEvent.Mvc.Helpers
@using MC.RideEvent.Mvc.Models.ViewModel
@model IEnumerable<WayViewModel>
@{
    var member = Session["CurrentMember"] as MemberViewModel;
}
<p>
    @*@Html.ActionLink("Create New", "Create")*@
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.DriverId)
        </th>
        <th>
            @Html.DisplayName("Intitulé")
        </th>
        <th>
            @Html.DisplayName("Vehicule")
        </th>
        <th>
            @Html.DisplayName("Participation")
        </th>
        <th>
            @Html.DisplayName("Heure rendez-vous")
        </th>
        <th>
            @Html.DisplayName("Lieu rendez-vous")
        </th>
        <th>
            @Html.DisplayName("Ville rendez-vous")
        </th>
        <th>
            @Html.DisplayName("Nombre de place disponible")
        </th>
        <th>
            @Html.DisplayName("Date evenement")
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.DriverId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Event.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.VehiculeId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Contribution)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.MeetingHour)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.MeetingPlace)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.City)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.NumberPlaces)
        </td>
        
        <td>
            @Html.Display(item.Event.DateBegin.ToStringFr())
        </td>
        <td>
            @*@Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })*@
        </td>
    </tr>
}

</table>
